/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * VentanaPrincipal.java
 *
 * Created on 21-feb-2014, 19:13:23
 */
package gui;

import java.util.ArrayList;
import java.util.ListIterator;
import javax.swing.JOptionPane;
import modelo.Artista;
import modelo.Cuadro;
import modelo.Escultor;
import modelo.Escultura;
import modelo.Exposicion;
import modelo.Fotografia;
import modelo.Fotografo;
import modelo.Pintor;

/**
 *
 * @author Lenovo
 */
public class VentanaPrincipal extends javax.swing.JFrame {

    private Exposicion laExposicion;

    /**
     * Creates new form VentanaPrincipal
     */
    public VentanaPrincipal() {
        initComponents();
        setLocationRelativeTo(this);
        laExposicion = new Exposicion();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        jLTitulo = new javax.swing.JLabel();
        jTPPrincipal = new javax.swing.JTabbedPane();
        jPRegExpo = new javax.swing.JPanel();
        jPGeneral = new javax.swing.JPanel();
        jLNumId = new javax.swing.JLabel();
        jLTipoId = new javax.swing.JLabel();
        jLNombres = new javax.swing.JLabel();
        jLApellidos = new javax.swing.JLabel();
        jLGenero = new javax.swing.JLabel();
        jLNacionalidad = new javax.swing.JLabel();
        jLCorreo = new javax.swing.JLabel();
        jTFNumId = new javax.swing.JTextField();
        jCBTipoId = new javax.swing.JComboBox();
        jTFNombres = new javax.swing.JTextField();
        jTFApellidos = new javax.swing.JTextField();
        jTFNacionalidad = new javax.swing.JTextField();
        jTFCorreo = new javax.swing.JTextField();
        jCBGenero = new javax.swing.JComboBox();
        jPEspecifico = new javax.swing.JPanel();
        jCKPintor = new javax.swing.JCheckBox();
        jCKEscultor = new javax.swing.JCheckBox();
        jCKFotografo = new javax.swing.JCheckBox();
        jLTecnica = new javax.swing.JLabel();
        jLTipoEsc = new javax.swing.JLabel();
        jCBTecnica = new javax.swing.JComboBox();
        jCBTipoEsc = new javax.swing.JComboBox();
        jPOpciones = new javax.swing.JPanel();
        jBRegistrarAutor = new javax.swing.JButton();
        jBCancelarRegistroAutor = new javax.swing.JButton();
        jPRegObras = new javax.swing.JPanel();
        jPInfoGeneral = new javax.swing.JPanel();
        jLNombreObra = new javax.swing.JLabel();
        jLValorComercial = new javax.swing.JLabel();
        jTFNombreObra = new javax.swing.JTextField();
        jTFValorComercial = new javax.swing.JTextField();
        jPCuadro = new javax.swing.JPanel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jSAlto = new javax.swing.JSpinner();
        jSAncho = new javax.swing.JSpinner();
        jCBSuperficie = new javax.swing.JComboBox();
        jCBTipoIlus = new javax.swing.JComboBox();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jCBAutorCuadro = new javax.swing.JComboBox();
        jLabel18 = new javax.swing.JLabel();
        jCKCuadro = new javax.swing.JCheckBox();
        jCKEscultura = new javax.swing.JCheckBox();
        jCKFoto = new javax.swing.JCheckBox();
        jPEscultura = new javax.swing.JPanel();
        jLabel19 = new javax.swing.JLabel();
        jCBAutorEsc = new javax.swing.JComboBox();
        jLabel25 = new javax.swing.JLabel();
        jTFMaterial = new javax.swing.JTextField();
        jPFoto = new javax.swing.JPanel();
        jLabel20 = new javax.swing.JLabel();
        jCBAutorFoto = new javax.swing.JComboBox();
        jLabel26 = new javax.swing.JLabel();
        jCBColor = new javax.swing.JComboBox();
        jPOpciones_ = new javax.swing.JPanel();
        jBRegistrarObra = new javax.swing.JButton();
        jBCancelarRegObra = new javax.swing.JButton();
        jLImg = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Exposición de artes plásticas");

        jLTitulo.setFont(new java.awt.Font("Tahoma", 1, 36)); // NOI18N
        jLTitulo.setForeground(new java.awt.Color(0, 0, 153));
        jLTitulo.setText("Exposición de Artes Plásticas");

        jTPPrincipal.setForeground(new java.awt.Color(255, 0, 0));
        jTPPrincipal.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N

        jPGeneral.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Información General", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial", 1, 14), new java.awt.Color(0, 0, 204))); // NOI18N

        jLNumId.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLNumId.setForeground(new java.awt.Color(0, 0, 255));
        jLNumId.setText("Número de Identificación: ");

        jLTipoId.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLTipoId.setForeground(new java.awt.Color(0, 0, 255));
        jLTipoId.setText("Tipo de Identificación: ");

        jLNombres.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLNombres.setForeground(new java.awt.Color(0, 0, 255));
        jLNombres.setText("Nombres: ");

        jLApellidos.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLApellidos.setForeground(new java.awt.Color(0, 0, 255));
        jLApellidos.setText("Apellidos: ");

        jLGenero.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLGenero.setForeground(new java.awt.Color(0, 0, 255));
        jLGenero.setText("Género: ");

        jLNacionalidad.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLNacionalidad.setForeground(new java.awt.Color(0, 0, 255));
        jLNacionalidad.setText("Nacionalidad: ");

        jLCorreo.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLCorreo.setForeground(new java.awt.Color(0, 0, 255));
        jLCorreo.setText("Correo Electrónico: ");

        jTFNumId.setBackground(new java.awt.Color(204, 204, 255));
        jTFNumId.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jTFNumId.setForeground(new java.awt.Color(0, 0, 102));

        jCBTipoId.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jCBTipoId.setForeground(new java.awt.Color(0, 0, 102));
        jCBTipoId.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione una opción", "Cédula de Ciudadanía", "Cédula de Extranjería", "Tarjeta de Identidad" }));

        jTFNombres.setBackground(new java.awt.Color(204, 204, 255));
        jTFNombres.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jTFNombres.setForeground(new java.awt.Color(0, 0, 102));

        jTFApellidos.setBackground(new java.awt.Color(204, 204, 255));
        jTFApellidos.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jTFApellidos.setForeground(new java.awt.Color(0, 0, 102));

        jTFNacionalidad.setBackground(new java.awt.Color(204, 204, 255));
        jTFNacionalidad.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jTFNacionalidad.setForeground(new java.awt.Color(0, 0, 102));

        jTFCorreo.setBackground(new java.awt.Color(204, 204, 255));
        jTFCorreo.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jTFCorreo.setForeground(new java.awt.Color(0, 0, 102));

        jCBGenero.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jCBGenero.setForeground(new java.awt.Color(0, 0, 102));
        jCBGenero.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione una opción", "Femenino", "Masculino" }));

        javax.swing.GroupLayout jPGeneralLayout = new javax.swing.GroupLayout(jPGeneral);
        jPGeneral.setLayout(jPGeneralLayout);
        jPGeneralLayout.setHorizontalGroup(
            jPGeneralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPGeneralLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPGeneralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLNumId)
                    .addComponent(jLTipoId)
                    .addComponent(jLCorreo)
                    .addComponent(jLNacionalidad)
                    .addComponent(jLGenero)
                    .addComponent(jLApellidos)
                    .addComponent(jLNombres))
                .addGap(10, 10, 10)
                .addGroup(jPGeneralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jTFNacionalidad, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTFApellidos, javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPGeneralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(jCBTipoId, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jTFNumId, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jTFNombres)
                    .addComponent(jTFCorreo)
                    .addComponent(jCBGenero, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(34, 34, 34))
        );
        jPGeneralLayout.setVerticalGroup(
            jPGeneralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPGeneralLayout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addGroup(jPGeneralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTFNumId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLNumId))
                .addGap(8, 8, 8)
                .addGroup(jPGeneralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jCBTipoId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLTipoId))
                .addGap(18, 18, 18)
                .addGroup(jPGeneralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTFNombres, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLNombres))
                .addGap(18, 18, 18)
                .addGroup(jPGeneralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTFApellidos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLApellidos))
                .addGap(18, 18, 18)
                .addGroup(jPGeneralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jCBGenero, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLGenero))
                .addGap(18, 18, 18)
                .addGroup(jPGeneralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTFNacionalidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLNacionalidad))
                .addGap(18, 18, 18)
                .addGroup(jPGeneralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTFCorreo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLCorreo))
                .addContainerGap(19, Short.MAX_VALUE))
        );

        jPEspecifico.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Información Específica", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial", 1, 14), new java.awt.Color(51, 0, 204))); // NOI18N

        buttonGroup1.add(jCKPintor);
        jCKPintor.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jCKPintor.setForeground(new java.awt.Color(0, 0, 204));
        jCKPintor.setText("Pintor");
        jCKPintor.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                jCKPintorStateChanged(evt);
            }
        });

        buttonGroup1.add(jCKEscultor);
        jCKEscultor.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jCKEscultor.setForeground(new java.awt.Color(0, 0, 204));
        jCKEscultor.setText("Escultor");
        jCKEscultor.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                jCKEscultorStateChanged(evt);
            }
        });

        buttonGroup1.add(jCKFotografo);
        jCKFotografo.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jCKFotografo.setForeground(new java.awt.Color(0, 0, 204));
        jCKFotografo.setText("Fotógrafo");
        jCKFotografo.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                jCKFotografoStateChanged(evt);
            }
        });

        jLTecnica.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLTecnica.setForeground(new java.awt.Color(0, 0, 153));
        jLTecnica.setText("Técnica:");

        jLTipoEsc.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLTipoEsc.setForeground(new java.awt.Color(0, 0, 153));
        jLTipoEsc.setText("Tipo de Escultura:");

        jCBTecnica.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jCBTecnica.setForeground(new java.awt.Color(0, 0, 102));
        jCBTecnica.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione una opción", "Acuarela", "Fresco", "Óleo", "Pastel", "Tinta", "Otro" }));
        jCBTecnica.setEnabled(false);

        jCBTipoEsc.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jCBTipoEsc.setForeground(new java.awt.Color(0, 0, 102));
        jCBTipoEsc.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione una opción", "Busto", "Estatua", "Relieve", " " }));
        jCBTipoEsc.setEnabled(false);

        javax.swing.GroupLayout jPEspecificoLayout = new javax.swing.GroupLayout(jPEspecifico);
        jPEspecifico.setLayout(jPEspecificoLayout);
        jPEspecificoLayout.setHorizontalGroup(
            jPEspecificoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPEspecificoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPEspecificoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jCKPintor)
                    .addComponent(jCKEscultor)
                    .addComponent(jCKFotografo)
                    .addGroup(jPEspecificoLayout.createSequentialGroup()
                        .addGap(21, 21, 21)
                        .addGroup(jPEspecificoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPEspecificoLayout.createSequentialGroup()
                                .addComponent(jLTipoEsc)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jCBTipoEsc, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPEspecificoLayout.createSequentialGroup()
                                .addComponent(jLTecnica)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jCBTecnica, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))))
                .addContainerGap())
        );
        jPEspecificoLayout.setVerticalGroup(
            jPEspecificoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPEspecificoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jCKPintor)
                .addGap(11, 11, 11)
                .addGroup(jPEspecificoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLTecnica)
                    .addComponent(jCBTecnica, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jCKEscultor)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPEspecificoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLTipoEsc)
                    .addComponent(jCBTipoEsc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jCKFotografo)
                .addGap(61, 61, 61))
        );

        jPOpciones.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Opciones", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial", 1, 14), new java.awt.Color(51, 0, 204))); // NOI18N

        jBRegistrarAutor.setBackground(new java.awt.Color(238, 131, 54));
        jBRegistrarAutor.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jBRegistrarAutor.setForeground(new java.awt.Color(255, 0, 0));
        jBRegistrarAutor.setText("REGISTRAR");
        jBRegistrarAutor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBRegistrarAutorActionPerformed(evt);
            }
        });

        jBCancelarRegistroAutor.setBackground(new java.awt.Color(238, 131, 54));
        jBCancelarRegistroAutor.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jBCancelarRegistroAutor.setForeground(new java.awt.Color(255, 0, 0));
        jBCancelarRegistroAutor.setText("CANCELAR REGISTRO ACTUAL");
        jBCancelarRegistroAutor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBCancelarRegistroAutorActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPOpcionesLayout = new javax.swing.GroupLayout(jPOpciones);
        jPOpciones.setLayout(jPOpcionesLayout);
        jPOpcionesLayout.setHorizontalGroup(
            jPOpcionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPOpcionesLayout.createSequentialGroup()
                .addGroup(jPOpcionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPOpcionesLayout.createSequentialGroup()
                        .addGap(84, 84, 84)
                        .addComponent(jBRegistrarAutor))
                    .addGroup(jPOpcionesLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jBCancelarRegistroAutor)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPOpcionesLayout.setVerticalGroup(
            jPOpcionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPOpcionesLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jBRegistrarAutor)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jBCancelarRegistroAutor)
                .addContainerGap(26, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPRegExpoLayout = new javax.swing.GroupLayout(jPRegExpo);
        jPRegExpo.setLayout(jPRegExpoLayout);
        jPRegExpoLayout.setHorizontalGroup(
            jPRegExpoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPRegExpoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPGeneral, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jPRegExpoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPEspecifico, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPOpciones, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(65, 65, 65))
        );
        jPRegExpoLayout.setVerticalGroup(
            jPRegExpoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPRegExpoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPRegExpoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPRegExpoLayout.createSequentialGroup()
                        .addComponent(jPEspecifico, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPOpciones, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPGeneral, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTPPrincipal.addTab("Registro de Expositores", jPRegExpo);

        jPInfoGeneral.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Información General", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial", 1, 14), new java.awt.Color(0, 0, 204))); // NOI18N

        jLNombreObra.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLNombreObra.setForeground(new java.awt.Color(0, 0, 255));
        jLNombreObra.setText("Nombre de la Obra: ");

        jLValorComercial.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLValorComercial.setForeground(new java.awt.Color(0, 0, 255));
        jLValorComercial.setText("Valor Comercial:");

        jTFNombreObra.setBackground(new java.awt.Color(204, 204, 255));
        jTFNombreObra.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jTFNombreObra.setForeground(new java.awt.Color(0, 0, 102));

        jTFValorComercial.setBackground(new java.awt.Color(204, 204, 255));
        jTFValorComercial.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jTFValorComercial.setForeground(new java.awt.Color(0, 0, 102));

        javax.swing.GroupLayout jPInfoGeneralLayout = new javax.swing.GroupLayout(jPInfoGeneral);
        jPInfoGeneral.setLayout(jPInfoGeneralLayout);
        jPInfoGeneralLayout.setHorizontalGroup(
            jPInfoGeneralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPInfoGeneralLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLNombreObra)
                .addGap(10, 10, 10)
                .addComponent(jTFNombreObra, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(59, 59, 59)
                .addComponent(jLValorComercial)
                .addGap(45, 45, 45)
                .addComponent(jTFValorComercial, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(37, 37, 37))
        );
        jPInfoGeneralLayout.setVerticalGroup(
            jPInfoGeneralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPInfoGeneralLayout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addGroup(jPInfoGeneralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPInfoGeneralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jTFValorComercial, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLValorComercial))
                    .addGroup(jPInfoGeneralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jTFNombreObra, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLNombreObra)))
                .addContainerGap(25, Short.MAX_VALUE))
        );

        jPCuadro.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 153), 1, true));

        jLabel12.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel12.setForeground(new java.awt.Color(0, 0, 255));
        jLabel12.setText("Alto:");

        jLabel13.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel13.setForeground(new java.awt.Color(0, 0, 255));
        jLabel13.setText("Ancho:");

        jLabel14.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel14.setForeground(new java.awt.Color(0, 0, 255));
        jLabel14.setText("Superficie:");

        jLabel15.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel15.setForeground(new java.awt.Color(0, 0, 255));
        jLabel15.setText("Tipo Ilustración: ");

        jSAlto.setEnabled(false);

        jSAncho.setEnabled(false);

        jCBSuperficie.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jCBSuperficie.setForeground(new java.awt.Color(0, 0, 102));
        jCBSuperficie.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione una opción", "Lienzo", "Madera", "Papel", "Otro", " " }));
        jCBSuperficie.setEnabled(false);

        jCBTipoIlus.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jCBTipoIlus.setForeground(new java.awt.Color(0, 0, 102));
        jCBTipoIlus.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione una opción", "Abstracto", "Bodegón", "Desnudo", "Paisaje", "Retrato", "Otro" }));
        jCBTipoIlus.setEnabled(false);

        jLabel16.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel16.setForeground(new java.awt.Color(0, 0, 255));
        jLabel16.setText("cm");

        jLabel17.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel17.setForeground(new java.awt.Color(0, 0, 255));
        jLabel17.setText("cm");

        jCBAutorCuadro.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jCBAutorCuadro.setForeground(new java.awt.Color(0, 0, 102));
        jCBAutorCuadro.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione un autor" }));
        jCBAutorCuadro.setEnabled(false);

        jLabel18.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel18.setForeground(new java.awt.Color(0, 0, 255));
        jLabel18.setText("Autor:");

        javax.swing.GroupLayout jPCuadroLayout = new javax.swing.GroupLayout(jPCuadro);
        jPCuadro.setLayout(jPCuadroLayout);
        jPCuadroLayout.setHorizontalGroup(
            jPCuadroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPCuadroLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPCuadroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPCuadroLayout.createSequentialGroup()
                        .addGroup(jPCuadroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel12)
                            .addComponent(jLabel13)
                            .addComponent(jLabel14))
                        .addGap(53, 53, 53)
                        .addGroup(jPCuadroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPCuadroLayout.createSequentialGroup()
                                .addComponent(jSAncho, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel17))
                            .addGroup(jPCuadroLayout.createSequentialGroup()
                                .addComponent(jSAlto, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel16))
                            .addComponent(jCBSuperficie, 0, 115, Short.MAX_VALUE)))
                    .addGroup(jPCuadroLayout.createSequentialGroup()
                        .addGroup(jPCuadroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel15)
                            .addComponent(jLabel18))
                        .addGap(14, 14, 14)
                        .addGroup(jPCuadroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jCBAutorCuadro, 0, 115, Short.MAX_VALUE)
                            .addComponent(jCBTipoIlus, 0, 115, Short.MAX_VALUE))))
                .addContainerGap())
        );
        jPCuadroLayout.setVerticalGroup(
            jPCuadroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPCuadroLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPCuadroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(jSAlto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel16))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPCuadroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel13)
                    .addComponent(jSAncho, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel17))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPCuadroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel14)
                    .addComponent(jCBSuperficie, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPCuadroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel15)
                    .addComponent(jCBTipoIlus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE)
                .addGroup(jPCuadroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jCBAutorCuadro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel18))
                .addContainerGap())
        );

        buttonGroup2.add(jCKCuadro);
        jCKCuadro.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jCKCuadro.setForeground(new java.awt.Color(0, 0, 204));
        jCKCuadro.setText("Cuadro");
        jCKCuadro.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                jCKCuadroStateChanged(evt);
            }
        });

        buttonGroup2.add(jCKEscultura);
        jCKEscultura.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jCKEscultura.setForeground(new java.awt.Color(0, 0, 204));
        jCKEscultura.setText("Escultura");
        jCKEscultura.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                jCKEsculturaStateChanged(evt);
            }
        });

        buttonGroup2.add(jCKFoto);
        jCKFoto.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jCKFoto.setForeground(new java.awt.Color(0, 0, 204));
        jCKFoto.setText("Fotografia");
        jCKFoto.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                jCKFotoStateChanged(evt);
            }
        });

        jPEscultura.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 153), 1, true));

        jLabel19.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel19.setForeground(new java.awt.Color(0, 0, 255));
        jLabel19.setText("Material: ");

        jCBAutorEsc.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jCBAutorEsc.setForeground(new java.awt.Color(0, 0, 102));
        jCBAutorEsc.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione un autor" }));
        jCBAutorEsc.setEnabled(false);

        jLabel25.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel25.setForeground(new java.awt.Color(0, 0, 255));
        jLabel25.setText("Autor:");

        jTFMaterial.setBackground(new java.awt.Color(204, 204, 255));
        jTFMaterial.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jTFMaterial.setForeground(new java.awt.Color(0, 0, 102));

        javax.swing.GroupLayout jPEsculturaLayout = new javax.swing.GroupLayout(jPEscultura);
        jPEscultura.setLayout(jPEsculturaLayout);
        jPEsculturaLayout.setHorizontalGroup(
            jPEsculturaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPEsculturaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPEsculturaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel19)
                    .addComponent(jLabel25))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPEsculturaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jCBAutorEsc, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jTFMaterial))
                .addContainerGap())
        );
        jPEsculturaLayout.setVerticalGroup(
            jPEsculturaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPEsculturaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPEsculturaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel19)
                    .addComponent(jTFMaterial, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPEsculturaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel25)
                    .addComponent(jCBAutorEsc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(22, Short.MAX_VALUE))
        );

        jPFoto.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 153), 1, true));

        jLabel20.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel20.setForeground(new java.awt.Color(0, 0, 255));
        jLabel20.setText("Color:");

        jCBAutorFoto.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jCBAutorFoto.setForeground(new java.awt.Color(0, 0, 102));
        jCBAutorFoto.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione un autor" }));
        jCBAutorFoto.setEnabled(false);
        jCBAutorFoto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCBAutorFotoActionPerformed(evt);
            }
        });

        jLabel26.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel26.setForeground(new java.awt.Color(0, 0, 255));
        jLabel26.setText("Autor:");

        jCBColor.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jCBColor.setForeground(new java.awt.Color(0, 0, 102));
        jCBColor.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione una opción", "Blanco y Negro", "Color", "Grises", " " }));
        jCBColor.setEnabled(false);

        javax.swing.GroupLayout jPFotoLayout = new javax.swing.GroupLayout(jPFoto);
        jPFoto.setLayout(jPFotoLayout);
        jPFotoLayout.setHorizontalGroup(
            jPFotoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPFotoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPFotoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel20)
                    .addComponent(jLabel26))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPFotoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jCBAutorFoto, 0, 124, Short.MAX_VALUE)
                    .addComponent(jCBColor, 0, 124, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPFotoLayout.setVerticalGroup(
            jPFotoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPFotoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPFotoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel20)
                    .addComponent(jCBColor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPFotoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel26)
                    .addComponent(jCBAutorFoto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(22, Short.MAX_VALUE))
        );

        jPOpciones_.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Opciones", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial", 1, 14), new java.awt.Color(51, 0, 204))); // NOI18N

        jBRegistrarObra.setBackground(new java.awt.Color(238, 131, 54));
        jBRegistrarObra.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jBRegistrarObra.setForeground(new java.awt.Color(255, 0, 0));
        jBRegistrarObra.setText("REGISTRAR");
        jBRegistrarObra.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBRegistrarObraActionPerformed(evt);
            }
        });

        jBCancelarRegObra.setBackground(new java.awt.Color(238, 131, 54));
        jBCancelarRegObra.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jBCancelarRegObra.setForeground(new java.awt.Color(255, 0, 0));
        jBCancelarRegObra.setText("CANCELAR REGISTRO ACTUAL");

        javax.swing.GroupLayout jPOpciones_Layout = new javax.swing.GroupLayout(jPOpciones_);
        jPOpciones_.setLayout(jPOpciones_Layout);
        jPOpciones_Layout.setHorizontalGroup(
            jPOpciones_Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPOpciones_Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jBRegistrarObra)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 24, Short.MAX_VALUE)
                .addComponent(jBCancelarRegObra))
        );
        jPOpciones_Layout.setVerticalGroup(
            jPOpciones_Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPOpciones_Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPOpciones_Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jBCancelarRegObra, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jBRegistrarObra, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(12, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPRegObrasLayout = new javax.swing.GroupLayout(jPRegObras);
        jPRegObras.setLayout(jPRegObrasLayout);
        jPRegObrasLayout.setHorizontalGroup(
            jPRegObrasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPRegObrasLayout.createSequentialGroup()
                .addGap(21, 21, 21)
                .addGroup(jPRegObrasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPCuadro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jCKCuadro))
                .addGap(18, 18, 18)
                .addGroup(jPRegObrasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPRegObrasLayout.createSequentialGroup()
                        .addGroup(jPRegObrasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPEscultura, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jCKEscultura))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPRegObrasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jCKFoto)
                            .addComponent(jPFoto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addComponent(jPOpciones_, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
            .addGroup(jPRegObrasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPRegObrasLayout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jPInfoGeneral, javax.swing.GroupLayout.PREFERRED_SIZE, 697, Short.MAX_VALUE)
                    .addContainerGap()))
        );
        jPRegObrasLayout.setVerticalGroup(
            jPRegObrasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPRegObrasLayout.createSequentialGroup()
                .addGap(113, 113, 113)
                .addGroup(jPRegObrasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPRegObrasLayout.createSequentialGroup()
                        .addComponent(jCKCuadro)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jPCuadro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPRegObrasLayout.createSequentialGroup()
                        .addGroup(jPRegObrasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jCKEscultura)
                            .addComponent(jCKFoto))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPRegObrasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPEscultura, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jPFoto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jPOpciones_, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(13, Short.MAX_VALUE))
            .addGroup(jPRegObrasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPRegObrasLayout.createSequentialGroup()
                    .addGap(12, 12, 12)
                    .addComponent(jPInfoGeneral, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(228, Short.MAX_VALUE)))
        );

        jTPPrincipal.addTab("Registro de Obras", jPRegObras);

        jLImg.setBackground(new java.awt.Color(51, 0, 204));
        jLImg.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/paleta-pintura.jpg"))); // NOI18N
        jLImg.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED, new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 204), new java.awt.Color(0, 0, 204), new java.awt.Color(255, 0, 0)));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(102, 102, 102)
                        .addComponent(jLTitulo))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(222, 222, 222)
                        .addComponent(jLImg))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(29, 29, 29)
                        .addComponent(jTPPrincipal, javax.swing.GroupLayout.PREFERRED_SIZE, 722, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(19, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLTitulo)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLImg)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jTPPrincipal, javax.swing.GroupLayout.PREFERRED_SIZE, 363, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jCKPintorStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jCKPintorStateChanged
        // TODO add your handling code here:
        //Este evento habilita el combo correspondiente cuando una caja de
        //verificación se encuentra seleccionada
        if (jCKPintor.isSelected()) {
            jCBTecnica.setEnabled(true);

        } else {
            jCBTecnica.setEnabled(false);
        }
    }//GEN-LAST:event_jCKPintorStateChanged

    private void jCKEscultorStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jCKEscultorStateChanged
        // TODO add your handling code here:
        if (jCKEscultor.isSelected()) {
            jCBTipoEsc.setEnabled(true);

        } else {
            jCBTipoEsc.setEnabled(false);
        }
    }//GEN-LAST:event_jCKEscultorStateChanged

    private void jCKFotografoStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jCKFotografoStateChanged
        // TODO add your handling code here:
    }//GEN-LAST:event_jCKFotografoStateChanged

    private void jBCancelarRegistroAutorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBCancelarRegistroAutorActionPerformed
        // TODO add your handling code here:
        jTFNumId.setText(null);
        jCBTipoId.setSelectedIndex(0);
        jTFNombres.setText(null);
        jTFApellidos.setText(null);
        jCBGenero.setSelectedIndex(0);
        jTFNacionalidad.setText(null);
        jTFCorreo.setText(null);
    }//GEN-LAST:event_jBCancelarRegistroAutorActionPerformed

    private void jCKCuadroStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jCKCuadroStateChanged
        // TODO add your handling code here:
        if (jCKCuadro.isSelected()) {
            cargarPintores();
            jSAlto.setEnabled(true);
            jSAncho.setEnabled(true);
            jCBSuperficie.setEnabled(true);
            jCBTipoIlus.setEnabled(true);
            jCBAutorCuadro.setEnabled(true);

        } else {
            jSAlto.setEnabled(false);
            jSAncho.setEnabled(false);
            jCBSuperficie.setEnabled(false);
            jCBTipoIlus.setEnabled(false);
            jCBAutorCuadro.setEnabled(false);
        }
    }//GEN-LAST:event_jCKCuadroStateChanged

    private void jCKEsculturaStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jCKEsculturaStateChanged
        // TODO add your handling code here:
        if (jCKEscultura.isSelected()) {
            cargarEscultores();
            jTFMaterial.setEnabled(true);
            jCBAutorEsc.setEnabled(true);
        } else {
            jTFMaterial.setEnabled(false);
            jCBAutorEsc.setEnabled(false);
        }
    }//GEN-LAST:event_jCKEsculturaStateChanged

    private void jCKFotoStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jCKFotoStateChanged
        // TODO add your handling code here:
        if (jCKFoto.isSelected()) {
            cargarfotografos();
            jCBColor.setEnabled(true);
            jCBAutorFoto.setEnabled(true);
        } else {
            jCBColor.setEnabled(false);
            jCBAutorFoto.setEnabled(false);
        }
    }//GEN-LAST:event_jCKFotoStateChanged

    private void jCBAutorFotoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCBAutorFotoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jCBAutorFotoActionPerformed

    private void jBRegistrarAutorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBRegistrarAutorActionPerformed
        // TODO add your handling code here:
        String id = jTFNumId.getText();
        String tipoId = (String) jCBTipoId.getSelectedItem();
        String nombres = jTFNombres.getText();
        String apellidos = jTFApellidos.getText();
        String genero = (String) jCBGenero.getSelectedItem();
        String nacion = jTFNacionalidad.getText();
        String correo = jTFCorreo.getText();
        if (jCKPintor.isSelected()) {
            String tecnica = (String) jCBTecnica.getSelectedItem();
            String msj = laExposicion.registrarArtista(new Pintor(id, tipoId, nombres, apellidos, genero, nacion, correo, tecnica));
            JOptionPane.showMessageDialog(null, msj);
        }
        if (jCKEscultor.isSelected()) {
            String tipoEsc = (String) jCBTipoEsc.getSelectedItem();
            String msj = laExposicion.registrarArtista(new Escultor(id, tipoId, nombres, apellidos, genero, nacion, correo, tipoEsc));
            JOptionPane.showMessageDialog(null, msj);
        }
        if (jCKFotografo.isSelected()) {
            String msj = laExposicion.registrarArtista(new Fotografo(id, tipoId, nombres, apellidos, genero, nacion, correo));
            JOptionPane.showMessageDialog(null, msj);
        }
    }//GEN-LAST:event_jBRegistrarAutorActionPerformed

    private void jBRegistrarObraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBRegistrarObraActionPerformed
        // TODO add your handling code here:
        String nombreObra = jTFNombreObra.getText();
        double valComercial = Double.parseDouble(jTFValorComercial.getText());
        if (jCKCuadro.isSelected()) {
            int alto = (Integer) jSAlto.getValue();
            int ancho = (Integer) jSAncho.getValue();
            String superf = (String) jCBSuperficie.getSelectedItem();
            String TipoIlus = (String) jCBTipoIlus.getSelectedItem();
            String autor = (String) jCBAutorCuadro.getSelectedItem();
            String[] nombreAutor = autor.split(" ");
            Artista art = laExposicion.buscarArtista(nombreAutor[0], nombreAutor[1]);
            if (art != null) {
                String msj = art.registrarObra(new Cuadro(nombreObra, valComercial, art, alto, ancho, superf, TipoIlus));
                JOptionPane.showMessageDialog(null, msj);
            } else {
                JOptionPane.showMessageDialog(null, "El autor no esta registrado en la exposición.");
            }
        }
        if (jCKEscultura.isSelected()) {
            String material = jTFMaterial.getText();
            String autor = (String) jCBAutorEsc.getSelectedItem();
            String[] nombreAutor = autor.split(" ");
            Artista art = laExposicion.buscarArtista(nombreAutor[0], nombreAutor[1]);
            if (art != null) {
                String msj = art.registrarObra(new Escultura(nombreObra, valComercial, art, material));
                JOptionPane.showMessageDialog(null, msj);
            } else {
                JOptionPane.showMessageDialog(null, "El autor no esta registrado en la exposición.");
            }
        }
        if (jCKFoto.isSelected()) {
            String color = (String) jCBColor.getSelectedItem();
            String autor = (String) jCBAutorFoto.getSelectedItem();
            String[] nombreAutor = autor.split(" ");
            Artista art = laExposicion.buscarArtista(nombreAutor[0], nombreAutor[1]);
            if (art != null) {
                String msj = art.registrarObra(new Fotografia(nombreObra, valComercial, art, color));
                JOptionPane.showMessageDialog(null, msj);
            } else {
                JOptionPane.showMessageDialog(null, "El autor no esta registrado en la exposición.");
            }
        }
    }//GEN-LAST:event_jBRegistrarObraActionPerformed

    public void limpiarCamposRegExpositores() {
        buttonGroup1.clearSelection();
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.JButton jBCancelarRegObra;
    private javax.swing.JButton jBCancelarRegistroAutor;
    private javax.swing.JButton jBRegistrarAutor;
    private javax.swing.JButton jBRegistrarObra;
    private javax.swing.JComboBox jCBAutorCuadro;
    private javax.swing.JComboBox jCBAutorEsc;
    private javax.swing.JComboBox jCBAutorFoto;
    private javax.swing.JComboBox jCBColor;
    private javax.swing.JComboBox jCBGenero;
    private javax.swing.JComboBox jCBSuperficie;
    private javax.swing.JComboBox jCBTecnica;
    private javax.swing.JComboBox jCBTipoEsc;
    private javax.swing.JComboBox jCBTipoId;
    private javax.swing.JComboBox jCBTipoIlus;
    private javax.swing.JCheckBox jCKCuadro;
    private javax.swing.JCheckBox jCKEscultor;
    private javax.swing.JCheckBox jCKEscultura;
    private javax.swing.JCheckBox jCKFoto;
    private javax.swing.JCheckBox jCKFotografo;
    private javax.swing.JCheckBox jCKPintor;
    private javax.swing.JLabel jLApellidos;
    private javax.swing.JLabel jLCorreo;
    private javax.swing.JLabel jLGenero;
    private javax.swing.JLabel jLImg;
    private javax.swing.JLabel jLNacionalidad;
    private javax.swing.JLabel jLNombreObra;
    private javax.swing.JLabel jLNombres;
    private javax.swing.JLabel jLNumId;
    private javax.swing.JLabel jLTecnica;
    private javax.swing.JLabel jLTipoEsc;
    private javax.swing.JLabel jLTipoId;
    private javax.swing.JLabel jLTitulo;
    private javax.swing.JLabel jLValorComercial;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JPanel jPCuadro;
    private javax.swing.JPanel jPEscultura;
    private javax.swing.JPanel jPEspecifico;
    private javax.swing.JPanel jPFoto;
    private javax.swing.JPanel jPGeneral;
    private javax.swing.JPanel jPInfoGeneral;
    private javax.swing.JPanel jPOpciones;
    private javax.swing.JPanel jPOpciones_;
    private javax.swing.JPanel jPRegExpo;
    private javax.swing.JPanel jPRegObras;
    private javax.swing.JSpinner jSAlto;
    private javax.swing.JSpinner jSAncho;
    private javax.swing.JTextField jTFApellidos;
    private javax.swing.JTextField jTFCorreo;
    private javax.swing.JTextField jTFMaterial;
    private javax.swing.JTextField jTFNacionalidad;
    private javax.swing.JTextField jTFNombreObra;
    private javax.swing.JTextField jTFNombres;
    private javax.swing.JTextField jTFNumId;
    private javax.swing.JTextField jTFValorComercial;
    private javax.swing.JTabbedPane jTPPrincipal;
    // End of variables declaration//GEN-END:variables

    public void cargarPintores() {
        jCBAutorCuadro.removeAllItems();
        jCBAutorCuadro.addItem("Seleccione un autor");
        ArrayList<String> nombres = laExposicion.cargarPintores();
        if (nombres != null) {
            for (int i = 0; i < nombres.size(); i++) {
                jCBAutorCuadro.addItem(nombres.get(i));
            }
        }
    }

    public void cargarEscultores() {
        jCBAutorCuadro.removeAllItems();
        jCBAutorCuadro.addItem("Seleccione un autor");
        ArrayList<String> nombres = laExposicion.cargarEscultores();
        if (nombres != null) {
            for (int i = 0; i < nombres.size(); i++) {
                jCBAutorEsc.addItem(nombres.get(i));
            }
        }
    }

    public void cargarfotografos() {
        jCBAutorCuadro.removeAllItems();
        jCBAutorCuadro.addItem("Seleccione un autor");
        ArrayList<String> nombres = laExposicion.cargarFotografos();
        if (nombres != null) {
            for (int i = 0; i < nombres.size(); i++) {
                jCBAutorFoto.addItem(nombres.get(i));
            }
        }
    }
}
